{dialog.object}ajaxCallbackCrossDomain Method
Syntax
Arguments
- urlstring
The URL for the Ajax callback. The URL will typically include a query string with parameters.
- successFunctionfunction
The name of a JavaScript function to call when the Ajax callback completes. The callback takes a single argument, 'data', that contains the JSON returned by the Ajax callback.
- useJqueryboolean
Default = false. true/false. Specifies if the callback should be made using jQuery. If true, you must load the jQuery core library. If false, jQuery is not required.
- callbackAttributeNamestring
Default = 'callback'. (Advanced) Specify the name of the attribute used to send the successFunction to the Ajax callback. By convention, this is typically 'callback' or 'jsonp', though the web service you are calling may use a different name. This parameter is not used if useJquery is true.
Description
Performs a cross-domain Ajax callback.
Example
var url = 'http://itunes.apple.com/lookup?isbn=9780316069359'; var mySuccessFunction = function (data) { alert(JSON.stringify(data,'','\t')); } var callbackParameterName = 'callback'; {dialog.object}.ajaxCallbackCrossDomain(url, mySuccessFunction,false,callbackParameterName);
See Also